
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;


namespace Wheeler.Web.ViewModels
{
    [Serializable]
	public class UserViewModel : BaseViewModel
	{	
        /// <summary>
		/// Gets or sets the ID
		/// </summary>
        public int ID { get; set;}
            
        [Required(ErrorMessage= "Please Enter a User Name")]
        [StringLength(150, ErrorMessage = "The {0} can be maximum {1} characters long.")]
        [Display(Name = "User Name")] 
		public String UserName	{ get; set; }
            
        //[Required(ErrorMessage= "Please Enter a Password")]
        [StringLength(50, ErrorMessage = "The {0} can be maximum {1} characters long.")]
        [Display(Name = "Password")] 
		public String Password	{ get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm password")]
        [Compare("Password", ErrorMessage = "The password and confirm password do not match.")]
        public string ConfirmPassword { get; set; }
            
        [Required(ErrorMessage= "Please Choose Is Active?")]         
        [Display(Name = "Is Active")] 
		public String IsActive	{ get; set; }

        [Required(ErrorMessage= "Please Select a User Group")]
        [Range(1, int.MaxValue, ErrorMessage = "Please Select an User Group")]
        [Display(Name = "User Group")] 
        public int GroupID { get; set;}        

        [Display(Name = "Last Logged In")]
        public String LastLoggedIn { get; set; }        

        public GroupViewModel Group { get; set; }        
	}
}

